package edu.nanyang.struts;

import com.opensymphony.xwork2.ActionSupport;

import edu.nanyang.domain.User;
import edu.nanyang.hibernate.Register;

public class RegisterAction extends ActionSupport {
	User user;
	Register register;

	public Register getRegister() {
		return register;
	}

	public void setRegister(Register register) {
		this.register = register;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Override
	public String execute() {
		System.out.print(user);
		boolean s;
		s = register.register(user);
		System.out.print(s);
		if (s) {
			return SUCCESS;
		} else
			return INPUT;
	}
}
